import React from 'react';
import Suit from './Suit' //引入定义好的高阶组件
@Suit
class Ton extends React.Component{
    state={
        name:'苏轼',
        age:28,
        nickname:'苏东坡',
        hobby:'饮酒'
    }
    render(){
        console.log(this.props); //打印的是从高阶组件中传递过来的数据
        let {nickname,weapon,skill} = this.props 
   
        return(
            <fieldset>
                <legend>苏轼</legend>
                <h3>姓名：{this.state.name}</h3>
                <h3>昵称：{this.state.nickname}</h3>
                <h3>年龄：{this.state.age}</h3>
                <h3>爱好：{this.state.hobby}</h3>
                <h3>技能：{skill?skill:'写诗'}</h3>
                <h3>武器：{weapon?weapon:'111111111111'}</h3>

            </fieldset>
        )
    }
}
export default Ton